package com.vates.ejercicio2.negocio;

import java.util.Random;

import com.google.common.base.Preconditions;

public class Azar {
	
	private int value_max;
	
	public Azar(int value) {
		Preconditions.checkArgument(value>0,"El valor debe ser mayor que 0");
		value_max = value+1;
	}

	public int getNumeroAzar(){
		Random random = new Random();
		return random.nextInt(value_max);	
	}

}
